#include <bits/stdc++.h>

using namespace std;

const int maxn = 10;
int book[maxn];
int n = 4;

void dfs(int k) {//depth first search
    if (k >= n) {
        for (int i = 0; i < n; i++)cout << book[i];
        cout << endl;
        return;
    }
    book[k] = 0;
    dfs(k + 1);
    book[k] = 1;
    dfs(k + 1);

}

int main() {
	dfs(0);
}
